[script]
n0=;
n1=;         This section deals with startup/connect/disconnect/dde initialization
n2=;         There isn't much commenting in here...  you shouldn't have to touch it tho.
n3=;
n4=;         If you modify this stuff, have fun!! If you mess it up, your're on your own!
n5=;         Remember that any lines that appear after an error occurs will not be exceuted
n6=;
n7=;         The first part deals with DDE service name resolution and stuff like that...
n8=;         It's real tricky...   messing this up will most likely cause all of Little Star's
n9=;         external applications to not run properly (if at all)
n10=;
n11=alias rdde return $r(a,z) $+ $r(a,z) $+ $r(a,z) $+ $r(a,z) $+ $r(a,z) $+ $r(a,z) $+ $r(a,z) $+ $r(a,z)
n12=alias initdde return $1
n13=alias checkdde {
n14=  set %temp $rdde | set %init $rdde
n15=  ddeserver on %init | if $1 = clear clear
n16=  dde %DDEService command "" /dden $initdde(%init) $initdde(%temp)
n17=}
n18=alias rm return $read -l $+ $1 $mircdiroptions\messages.txt
n19=alias taken {
n20=  .timer910 off | echo -a %dis10 $+ DDE service name confliction!
n21=  echo -a %dis23 $+ -DDE Wizard- %dis22 $+ " $+ %DDEservice $+ " is already in use by another Little Star
n22=  echo -a %dis23 $+ -DDE Wizard- %dis22 $+ selecting a random service name...
n23=  set %originaldde %ddeservice | set %ddeservice $rdde | .timer 1 2 chdde
n24=}
n25=alias dden if $2 != %temp dde $1 command "" /taken
n26=alias ensuredde {
n27=  if (($ddename != %originaldde) && ($ddename != %ddeservice)) {
n28=    .timer230 off
n29=    echo -a %dis23 $+ -DDE Wizard- %dis22 $+ it appears the dde server initialization failed.
n30=    echo -a %dis23 $+ -DDE Wizard- %dis22 $+ selecting a random service name...
n31=    set %ddeservice $rdde | .timer 1 2 chdde
n32=  }
n33=}
n34=alias chdde ddeserver on %ddeservice | .timer 1 1 lcontrol | speaktome
n35=alias lcontrol run $mircdirbin\control.exe $ddename $+ @ $+ $mircdir
n36=alias speaktome .timer230 -o 1 35 restartcontrol
n37=alias restartcontrol run $mircdirbin\control.exe $ddename $+ @ $+ $mircdir | .timer -o 1 60 checkcontrol | .timer128 off | .timer127 off | .timer126 1 90 startchecking
n38=alias checkcontrol {
n39=  if ($notimer(230)) {
n40=    .timer126 -o 1 90 startchecking | .timer128 off
n41=    alert
n42=    echo -a %dis23 $+ -DDE Wizard- %dis22 $+ There appears to be an error with the DDE link to
n43=    echo -a %dis23 $+ -DDE Wizard- %dis22 $+ control.exe, which needs to be running in the
n44=    echo -a %dis23 $+ -DDE Wizard- %dis22 $+ background.
n45=    echo 4 -a �
n46=    echo -a %dis23 $+ -DDE Wizard- %dis22 $+ Most likely, one of us is confused regarding the
n47=    echo -a %dis23 $+ -DDE Wizard- %dis22 $+ proper DDE name to use, which is currently $ddename $+ .
n48=    .timer 1 2 echo -a %dis23 $+ -DDE Wizard- %dis22 $+ I will now attempt to correct this problem.
n49=    echo 4 -a �
n50=    .timer 1 3 echo -a %dis23 $+ -DDE Wizard- %dis22 $+ selecting a random DDE service name...
n51=    .timer 1 4 ddeserver on $rdde
n52=    .timer 1 6 echo -a %dis23 $+ -DDE Wizard- %dis22 $+ relaunching the control center
n53=    .timer 1 6 lcontrol | .timer 1 60 checknow
n54=    .timer 1 7 echo -a %dis23 $+ -DDE Wizard- %dis22 $+ if you do not hear from me again soon, all is well
n55=  }
n56=}
n57=alias altconnect {
n58=  .timer126 -o 1 90 startchecking
n59=  if (%starting) {
n60=    unset %starting
n61=    if (%rh61 != $true) {
n62=      inc %st61
n63=      if %st61 // 10 { dde control $ddename readhelp %st61 }
n64=    }
n65=    if (%altconnect) {
n66=      if ((%server != $null) && (%sport != $null)) dde control $ddename $+ connect showlist %server $+ : $+ %sport
n67=      else dde control $ddename $+ connect showlist $null
n68=    }
n69=  }
n70=}
n71=alias startchecking .timer128 -o 0 15 querycontrol
n72=alias querycontrol {
n73=  if ($notimer(230)) {
n74=    dde control $ddename just checking
n75=    .timer127 -o 0 15 restartcontrol
n76=  }
n77=}
n78=alias imhere .timer127 off
n79=alias checknow {
n80=  if ($notimer(230)) {
n81=    alert
n82=    echo -a %dis23 $+ -DDE Wizard- %dis22 $+ I am still having trouble establishing a communication
n83=    echo -a %dis23 $+ -DDE Wizard- %dis22 $+ link to the control center.  It is currently not running,
n84=    echo -a %dis23 $+ -DDE Wizard- %dis22 $+ or is not communicating with me.
n85=    echo 4 -a �
n86=    echo -a %dis23 $+ -DDE Wizard- %dis22 $+ I have tried alternate methods and am exhausted.
n87=    echo -a %dis23 $+ -DDE Wizard- %dis22 $+ This is final; I will not attempt to reload it again.
n88=    echo 4 -a �
n89=    echo -a %dis23 $+ -DDE Wizard- %dis22 $+ For help trouble shooting, please see the help file.
n90=  }
n91=}
n92=alias doconnect {
n93=  %i = 0
n94=  :nx
n95=  inc %i | %delay = %i * 2
n96=  set %temp $readini $mircdiroptions\options.ini OnConnect  [ [ $1 ] $+ [ %i ] ]
n97=  if (%temp != $null) { .timer 1 %delay %temp | goto nx }
n98=}
n99=alias showstartupdisplay {
n100=  echo 2 ---------------------------------------------------------------------------------------------
n101=  echo 4 Hello $readini c:\setuplog.txt NameandOrg Name
n102=  echo 4 �
n103=  echo 4 ������ You are using Little Star 6.1
n104=  echo 4 �
n105=  echo 6 �������For updates, check 13http://www.littlestarirc.com
n106=  echo 4 �
n107=  echo 2 ---------------------------------------------------------------------------------------------
n108=  echo 4 �
n109=}
n110=alias checkdirectory {
n111=  if (($right($mircdir,1) != \) || ($chr(32) isin $mircdir)) {
n112=    echo 3 -a acccckkkkkkk!
n113=    echo 3 -a You fall into the same category as 99% of the world who refuses to read readme.txt files.  You installed Little Star to $mircdir $+ , which has a space in the name.  mIRC cannot deal with this in many of it's commands and identifiers and many things will not work right!!!
n114=    echo 4 -a Sorry, but you need to re-install this program!!
n115=    alert     
n116=  }
n117=}
n118=on 1:START:{
n119=  loaddisplay
n120=  set %starting $true
n121=  .timer -o 1 10 ensuredde
n122=  set %DDEService $ro(general,DDEservice)
n123=  writeini $mircdirmirc.ini dde ServiceName %DDEService
n124=  checkdde clear
n125=  .timer910 1 2 chdde
n126=  .ial on
n127=  splay $mircdirstartup.wav
n128=  titlebar Little Star 6.1 Not Connected
n129=  showstartupdisplay
n130=  unset %amsg*
n131=  if (%awaylog = $null) set %awaylog $true
n132=  set %msgs 0
n133=  set %urd $false
n134=  set %notinit $false
n135=  readoptions
n136=  set %notinit $true
n137=  if ((%reset) && (%log)) write -c $logdir\session.log
n138=  if (%botlite) .enable #bot
n139=  else .disable #bot
n140=  .disable #XDCC
n141=  if (%log) write $mircdirlogs\session.log Session Beginning $day $adate $timestamp
n142=  set %dom1 dial-access.att.net
n143=  set %dom2 nodak.edu
n144=  set %dom3 mindspring.com
n145=  set %dom4 uu.net
n146=  if (%firstrun = $null) { usbl | set %firstrun $false }
n147=  if ((%getnick) && ($me != %mynick)) nick %mynick
n148=  set %acn1 $chr(73)
n149=  set %acn2 $chr(108)
n150=  write -c $mircdirrepeat.ini
n151=  write -c $mircdiridle.ini
n152=  set %temp $readini $ul version version
n153=  if %temp != 55 convertuserlist
n154=  checkdirectory
n155=  loadpopups
n156=  loadsounds
n157=}
n158=on 1:CONNECT:{
n159=  .timer933 off
n160=  dde connect $ddename die connected
n161=  .disable #lagmode #clonedeop #login #lookup #revenge #getlong #rclone #nflood
n162=  .disable #invitenames #allwho #altadd #altrem #stats #aww #wbm #lookup2
n163=  .disable #geticmpip #filterops #nukeinfoip #nukeinfoserver
n164=  .disable #clearbans #page #scanlookup #findmatch
n165=  .disable #connectionlookup #findmatch2 #telnetdns #verifylamer #verifylamer2
n166=  .enable #regdns #regctcp #nw
n167=  set %wmip $left($ip,3) $+ .*.*.*
n168=  set %mock $false
n169=  set %donewhois 0
n170=  unset %gaveup
n171=  set %server $server | set %sport $port
n172=  .flood 3 3 30
n173=  .rlevel 70
n174=  .guser 70 $me 3
n175=  .auser 70 $me
n176=  unset %cnick* | unset %cadr* | unset %updatedial* | unset %ticks* | unset %xdccm*
n177=  unset %vote* | unset %real* | unset %fservcredit* | unset %lastpart* | unset %key*
n178=  unset %hbanned* | unset %atfs* | unset %rchan* | unset %rcs* | unset %ctcp*
n179=  unset %checkattempt* | unset %fsady* | unset %tv* | unset %tmsg*
n180=  unset %findnick* | unset %findnum | unset %fnum | unset %justfound*
n181=  if (%lagcheck) {
n182=    titlebar Little Star 6.1  $me on $server $+ : $+ $port  Lag: waiting for info
n183=    .timer101 0 120 getlag | getlag
n184=  }
n185=  else titlebar Little Star 6.1  $me on $server $+ : $+ $port
n186=  if ((%getnick) && ($me != %mynick)) getnick
n187=  .timer 0 600 /raw -q PRIVMSG $!me : $+ $chr(1) $+ PONG Anti-Idle! $+ $chr(1)
n188=  .timer 0 300 idlecheck
n189=  if (%cycleops) .timer 0 15 cycleops
n190=  .disable #page
n191=  if (undernet isin $server) { doconnect Undernet | set %type AlwaysUndernet }
n192=  elseif (dal.net isin $server) { doconnect Dalnet | set %type AlwaysDalnet }
n193=  elseif (galaxynet isin $server) { doconnect GalaxyNet | set %type AlwaysGalaxy }
n194=  else { doconnect Other | set %type AlwaysOther }
n195=  set %doneinit $false
n196=  .timer -o 1 15 set %doneinit $true
n197=  set %me $me
n198=  unset %myadr
n199=  .enable #gma
n200=  userhost $me
n201=  %c = 0 | unset %alwaysjoin*
n202=  :alwaysjoin
n203=  inc %c
n204=  set %temp $ro(%type,Chan [ $+ [ %c ] ] )
n205=  if %temp != $null {
n206=    set %alwaysjoin [ $+ [ %c ] ] %temp
n207=    goto alwaysjoin
n208=  }
n209=  set %temp $left(2,$time)
n210=  if (%temp = 1:) || (%temp = 2:) || (%temp = 3:) || (%temp = 4:) || (%temp = 5:) || (%temp = 6:) || (%temp = 7:) || (%temp = 8:) || (%temp = 9:) || (%temp = 10) || (%temp = 11) || (%temp = 0:) speak good morning $me $+ . little star is ready
n211=  elseif (%temp = 12) || (%temp = 13) || (%temp = 14) || (%temp = 15) || (%temp = 16) || (%temp = 17) speak good afternoon $me $+ . little star is ready
n212=  else speak good evening $me $+ . little star is ready
n213=  echo 4 -s ������
n214=  echo 4 -s ���������      ���           Little Star is ready!
n215=  echo 4 -s ������
n216=  if (%alwaysjoin1 != $null) { alwaysjoin | .timer 0 30 alwaysjoin }
n217=  if (%xcheckspeed) .timer167 0 15 checkspeed
n218=  halt
n219=}
n220=;
n221=;          "keep me connected" section
n222=;
n223=alias giveinfo dde $1- $server(0) $+ @ $+ %server
n224=alias constatus if $server = $null dde $1- tryagain
n225=on 1:DISCONNECT:{
n226=  titlebar Little Star 6.1 Not Connected
n227=  if ((%keepme) && (%gaveup != $true)) .timer933 -o 1 15 run $mircdirbin\connect.exe $ddename $mircdir
n228=  if (%sdiss = ding) ding
n229=  elseif (%sdiss = speak) speak You have been disconnected from your server
n230=  elseif (%sdiss != none) splay %sdiss
n231=}
